import {FC} from "react";
import { Route, RouteProps } from 'react-router-dom'

const PrivateRoute: FC<RouteProps> = ({component: Component, ...rest}) => {
    if (!Component) return null;
    return <Route {...rest} render={props => <Component {...props} />}/>
}
export default PrivateRoute;
